package com.demo.minicat;

import java.io.IOException;

/**
 * @author: lipan
 * @date: 2021/10/1 10:55
 */

public abstract class HttpServlet implements Servlet {


    abstract void  doGet(Request request, Response response);


    abstract void doPost(Request request, Response response);

    @Override
    public void service(Request request, Response response) throws Exception {
          if("GET".equals(request.getMethod())){
              doGet(request,response);
          }else{
              doPost(request,response);
          }
    }



}
